import { lightQueueList } from "@/api/service/light-queue/light-queue";
import { resetForm, showForm } from "./form";
import { keys, query, table } from "./table";

export const list = async () => {
  table.value.loading = true;
  const data = await lightQueueList(query.value);
  table.value.loading = false;
  table.value.data = data.rows;
  query.value.total = data.total;
};

export const edit = async (id?: string) => {
  showForm.value = true;
};
export const create = async () => {
  resetForm();
  showForm.value = true;
};
export const del = async (id?: string) => {
  await list();
  keys.value = [];
};
